package test;

import java.util.Scanner;

public class SecondClimb {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入楼梯台阶n");
        int n = sc.nextInt();
        int m = climb(n);
        System.out.println(m);

    }

    public static int climb(int n) {
        int a = 0, b = 0, c = 1;
        for (int i = 1; i <= n; i++) {
            a = b;
            b = c;
            c = a + b;
        }
        return c;
    }
}